pkgname=vdr-channelscan
pkgver=0.1.0
pkgrel=1
arch=('i686')
pkgdesc="A VDR plugin that scans satellites for channels"
url="http://kikko77.altervista.org/"
license=('GPL')
depends=('vdr' 'gcc' 'transponders')
source=(http://kikko77.altervista.org/sections/Download/%5B10%5D_channelscan/$pkgname-$pkgver.tgz \
	vdr-channelscan-extraqual.diff vdr-channelscan-path.diff)
md5sums=('dad171f25a2b3776aadb5e83ad209429' 'd9d67116cf1852e41634cc38845cc852'\
         '4cc153020851125248c3605ec68d7e18')

build() {
  cd $startdir/src/channelscan-$pkgver

  patch -Np1 -i $startdir/src/vdr-channelscan-extraqual.diff || return 1
  patch -Np1 -i $startdir/src/vdr-channelscan-path.diff || return 1

  sed -i 's:../../../libsi:libsi:' filter.c
  sed -i \
	 -e 's:@cp $@ :install -D -m 755 $@ $(DESTDIR):' \
	 -e 's:-I$(VDRDIR)/include:-I$(VDRDIR):' \
	 Makefile
  make VDRDIR=/usr/include/vdr LIBDIR=/usr/lib/vdr DESTDIR=$startdir/pkg all || return 1
}
